﻿using System;
using System.Collections.Generic;
using System.Linq;
using InvestmentIntelligence.DbModel.Models;

namespace InvestmentIntelligence.Data.Repository
{

    public interface ICurrencyUpdatableRepository : ICurrencyRepository, IUpdatableRepository<Currency>
    {
        int Add(Currency currency);
    }

    public interface ICurrencyRepository
    {
        /// <summary>
        ///     Return list of all currencies
        /// </summary>
        /// <returns></returns>
        List<T> GetList<T>(Func<IQueryable<Currency>, IEnumerable<T>> f);

        /// <summary>
        ///     Return list of all currencies
        /// </summary>
        /// <returns></returns>
        List<T> GetList<T>(Func<IQueryable<Currency>, IEnumerable<T>> f, string[] code);

        /// <summary>
        ///     Return currency By Id
        /// </summary>
        /// <param name="currncyId"></param>
        /// <returns></returns>
        Currency Get(int currncyId);

        /// <summary>
        ///     Return currency By Code
        /// </summary>
        /// <param name="currencyCode"></param>
        /// <returns></returns>
        Currency Get(string currencyCode);

        List<Currency> GetList();
    }
}